﻿@*
    TicketDesk - Attribution notice
    Contributor(s):

         Stephen Redd (stephen@reddnet.net, http://www.reddnet.net)

    This file is distributed under the terms of the Microsoft Public
    License (Ms-PL). See http://opensource.org/licenses/MS-PL
    for the complete terms of use.

    For any distribution that contains code from this file, this notice of
    attribution must remain intact, and a copy of the license must be
    provided to the recipient.
*@

@using TicketDesk.Domain.Model
@model IEnumerable<UserTicketListSetting>
@{
    var currentListSettings = (UserTicketListSetting)ViewBag.CurrentListSettings;
}
<div class="row menulist">
    <ul class="nav nav-tabs pull-right" role="tablist">
        @foreach (var list in Model)
        {
            var className = ((currentListSettings.ListName == list.ListName)) ? "active" : string.Empty;
            <li class="@className small">

                @Html.ActionLink(list.ListDisplayName, "Index", new { ListName = list.ListName })
            </li>

        }
        <li data-toggle="tooltip"
                      data-placement="bottom"
                      title="Reset all settings for all lists">
            <a href="#" class="" data-toggle="modal" data-target="#reset-confirm">
                <i class="fa fa-repeat"></i> <span class="hidden-xs hidden-sm">Reset Lists</span>
            </a>


        </li>

    </ul>

</div>
<!-- Modal -->
<div class="modal fade" id="reset-confirm" tabindex="-1" role="dialog" aria-labelledby="reset-confirm-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="reset-confirm-label">Are you sure you want to reset?</h4>
            </div>
            <div class="modal-body">
                <p class="alert alert-danger">
                    All lists will be reset, including custom sort and filter settings. This cannot be undone!
                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <a href="@Url.Action("ResetUserLists")" class="btn btn-primary">Reset Lists</a>
            </div>
        </div>
    </div>
</div>
